﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Windows.Forms;
using DAL;
using ORMapping;
using PublicCommon;

namespace BLL
{
    public class IntegrationViewBLL
    {
        public DataTable GetDataGridViewShowCards(String strFormName, Control.ControlCollection cc, String SQLWhere)
        {
            List<DAL.HQLParameter> hp = new List<DAL.HQLParameter>();
            string strHQL = "from IntegrationView C ";
            Functions.QueryWhere(strFormName, cc, ref hp, SQLWhere, ref strHQL);
            strHQL = String.Concat(strHQL, " order by C.CardID");
            IntegrationViewDAL dal = new IntegrationViewDAL();
            return NHibernateHelper.Convert.ConvertToDataTable<IntegrationView>(dal.GetAllCards(strHQL, hp));
        }
    }
}
